<?
/*
 *  GGB - Gelin's Guest Book.
 *  Copyright (C) 2006  Denis Nelubin aka Gelin
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *
 *  http://gelin.ru
 *  mailto:den@gelin.ru
 *
 *  Description:    Template of view messages via RSS.
 *
 *  History:
 *  2007-07-22  Gelin   Initially created.
 *
 */
?>
<?='<?xml version="1.0" encoding="UTF-8"?>'?>

<rss version="2.0">
    <channel>
        <title>GGB - Gelin's guest book</title>
        <!--link>./?profile=<?=$profile?></link-->
        <!--description>Gelin's guest book's latest messages.</description-->
        <!--language>en</language-->
        <lastBuildDate><?=$messages[0]['rss_last_time']?></lastBuildDate>
        <?foreach ($messages as $message):?>
            <item>
                <title>
                    <?=$message['name']?> <?if (isset($message['email'])):?>(<?=$message['email']?>)<?endif;?> <?if (isset($message['url'])):?><?=$message['url']?><?endif;?>
                </title>
                <description>
                    &lt;p&gt;
                    <?=$message['message']?>
                    &lt;/p&gt;
                    <?if (isset($message['reply'])):?>
                    &lt;p&gt;
                    &lt;hr /&gt;
                    &lt;i&gt;<?=$message['reply']?>&lt;/i&gt;
                    &lt;/p&gt;
                    <?endif;?>
                </description>
                <pubDate><?=$message['rss_post_time']?></pubDate>
            </item>
        <?endforeach;?>
    </channel>
</rss>